<template>
  <div class="container">
    <div>
      <ul>
        <li>
          由生成计划下发，自动生成工序派工单，自己查看自己的派工单即可。 需要明确派工单和报工单是1对1 还是1对多
        </li>
      </ul>

      <a-table :bordered="{cell:true}" :pagination="false" stripe :data="state.entityObj">
        <template #columns>
          <a-table-column title="贸易号" data-index="myh"></a-table-column>
          <a-table-column title="任务通知单号" data-index="taskno"></a-table-column>
          <a-table-column title="料品名称" data-index="lpmc"></a-table-column>
          <a-table-column title="产品标识号" data-index="cpm"></a-table-column>
          <a-table-column title="生产重量" data-index="sczl"></a-table-column>
          <a-table-column title="完工重量" data-index="wgcl"></a-table-column>
          <a-table-column title="工序" data-index="gx"></a-table-column>
          <a-table-column title="状态" data-index="gx"></a-table-column>
          <a-table-column title="报工详情">
            <template #cell="{ record }">
              报工人：陈宾，报工产量:15.2T,报工时间:2025-03-16 08:36
              <br />
              报工人：陈宾，报工产量:10.2T,报工时间:2025-03-16 10:36
            </template>
          </a-table-column>
          <a-table-column title="操作" width="250">
            <template #cell="{ record }">
              <a-space>
                <a-button type="primary" size="small" @click="viewEntity"><template #icon><icon-eye /></template>查看</a-button>
                <a-button type="primary" size="small" status="danger" @click=""><template #icon><icon-delete /></template>删除</a-button>
              </a-space>
            </template>
          </a-table-column>
        </template>
      </a-table>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { Message } from '@arco-design/web-vue'
import {reactive, ref, onMounted, onUnmounted, defineAsyncComponent} from "vue";
import { useRouter } from "vue-router";

const state = reactive({
  entityObj: [],
  entityViewVisible : false
})
const loadList = ()=>{
  state.entityObj = [
    {id : 1,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 2,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 3,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011-1', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 4,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 5,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011-2', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 6,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 7,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011-1-1', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 8,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 9,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 10,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 11,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 12,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 13,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 14,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 15,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 16,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
    {id : 17,myh:'贸2025-001', taskno : '2025-BC-0001',lpmc:'H13', cpm:'H13-250011', sczl:'25.2T', wgcl:'25.2T', gx:'下料', status:'已完工'},
    {id : 18,myh:'贸2025-002', taskno : '2025-BC-0001',lpmc:'H15', cpm:'H15-250015', sczl:'15.3T', wgcl:'15.2T', gx:'下料', status:'下下发'},
  ]
}
const viewEntity = ()=>{
  state.entityViewVisible = true
}
onMounted(()=>{
  loadList();
})
onUnmounted(()=>{
})
</script>

<style scoped lang="less">
ul{
  color: #f60000; font-weight: bold;font-size: 16px;
  li{
    padding : 10px;
  }
}
</style>
